package org.rency.ues.client.support;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.rency.ues.common.enums.EncryptType;

public class UesContext {

	private boolean isSuccess;
	private String returnMessage;
	/**
	 * 密钥
	 */
	private String ticket;
	/**
	 * 明文
	 */
	private String plainData;
	/**
	 * 加密方式
	 */
	private EncryptType encryptType = EncryptType.RSA;
	/**
	 * 有效时间(单位:分钟,0:永久)
	 */
	private long expireTime = 0;
	/**
	 * 客户端标识
	 */
	private String clientId;
	/**
	 * 版本号
	 */
	private long version;
	
	public boolean isSuccess() {
		return isSuccess;
	}
	public void setSuccess(boolean isSuccess) {
		this.isSuccess = isSuccess;
	}
	public String getReturnMessage() {
		return returnMessage;
	}
	public void setReturnMessage(String returnMessage) {
		this.returnMessage = returnMessage;
	}
	public String getTicket() {
		return ticket;
	}
	public void setTicket(String ticket) {
		this.ticket = ticket;
	}
	public String getPlainData() {
		return plainData;
	}
	public void setPlainData(String plainData) {
		this.plainData = plainData;
	}
	public EncryptType getEncryptType() {
		return encryptType;
	}
	public void setEncryptType(EncryptType encryptType) {
		this.encryptType = encryptType;
	}
	
	public long getExpireTime() {
		return expireTime;
	}
	public void setExpireTime(long expireTime) {
		this.expireTime = expireTime;
	}
	public String getClientId() {
		return clientId;
	}
	public void setClientId(String clientId) {
		this.clientId = clientId;
	}
	public long getVersion() {
		return version;
	}
	public void setVersion(long version) {
		this.version = version;
	}
	@Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
	
}